#include <iostream>
#include <algorithm>

int main()
{
    auto add = [](int a, int b) -> int {return a+b;}; //这种写法也被称作匿名函数
    int sum = add(500, 30);
    auto print_sum = [sum]() -> void{std::cout << "sum的值：" << sum << std::endl;};
    print_sum();

    return 0;
}

